FROM java:8
VOLUME /tmp
ADD demo.jar app.jar

ENV TZ="Asia/Shanghai"
ENV JAVA_OPTS="\
-server \
-Xmx400m"

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
RUN echo $TZ > /etc/timezone
RUN bash -c 'touch /app.jar'
EXPOSE 8080
ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /app.jar
